package com.yincb.mapper;

import com.yincb.entity.User;
import org.mybatis.spring.SqlSessionTemplate;

public class UserMapperImpl implements UserMapper {

    private SqlSessionTemplate sqlSession;
    public void setSqlSession(SqlSessionTemplate sqlSession) {
        this.sqlSession = sqlSession;
    }


    @Override
    public User selectUser(Integer id) {
        UserMapper mapper = sqlSession.getMapper(UserMapper.class);
        User user = mapper.selectUser(id);
        mapper.selectUser(id);
        return user;
    }
}
